<?
class userController extends iMVC_Controller{

    public function index(){
    
        $this->assign("name","现在是的userController的index方法");
        $this->assign("baseUrl",$this->getBaseUrl()); 
        
        $this->assign("userAnother","<p>你可以点击 <a href='".$this->getBaseUrl()."user-another/'>跳转到user的another方法</a>");
        $this->display("user.tpl");
    }
    public function another(){

        $this->assign("baseUrl",$this->getBaseUrl()); 
        $this->assign("indexIndex","<p>你可以点击 <a href='".$this->getBaseUrl()."'>跳转到index的index方法</a>");
        $this->assign("name","现在是的userController的another方法");
        //require_once('models/testModel.php'); 
        $tm=new testModel();
        /*
         
        $tm->id=2;
        $tm->name='bbb';
        $tm->number=888;
        $tm->save();

        */
        $tm->findByPk(28);
        
        //$this->assign('test',$tm->fetchAll('desc'));
        $this->assign('test',$tm);
        $this->display("user.tpl");
    
    }
    public function login(){
        $this->assign("baseUrl",$this->getBaseUrl());    
        $this->assign("name",$_POST['name']);    
        $this->assign("pass",$_POST['pass']);    
        $this->display("user.tpl");
    
    }

}
